package ooday05;

public class StaticFinaDemo {
    public static void main(String[] args) {

        System.out.println(Loo.PI);
        Loo.num = 5;
        System.out.println(Loo.num);
        System.out.println(Loo.COUNT);
        //Loo.PI = 3.1415926 // 编译错误,倡廉不能被改变
        /*
        1)加载Loo.class到方法区中
        2)静态变量num一并存储到方法区中
        3)到方法区中获取num的值并输出
         */


    }
}

class Loo {
    public static final double PI = 3.14159263;
    public static int num = 9263;//静态变量
    public static final double COUNT = 3.14;//常量(静态常量)

//    public static final int num = 10;

}